/**  
 * Project Name:zj-quartz  
 * File Name:ScheduleController.java  
 * Package Name:com.zhizai.zhujian.service.impl  
 * Date:2018年8月31日下午3:49:19  
 * Copyright (c) 2018, chenzhou1025@126.com All Rights Reserved.  
 *  
*/  
  
package com.zhizai.zhujian.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zhizai.zhujian.entity.Schedule;
import com.zhizai.zhujian.service.ScheduleService;

/**  
 * ClassName:ScheduleController <br/>  
 * Function: TODO ADD FUNCTION. <br/>  
 * Reason:   TODO ADD REASON. <br/>  
 * Date:     2018年8月31日 下午3:49:19 <br/>  
 * @author   feichao  
 */
@Controller
@RequestMapping("/schedule")
public class ScheduleController
{
    @Autowired
    private ScheduleService scheduleService;
    
    @RequestMapping(value = "/insertSchedule", method = RequestMethod.POST)
    @ResponseBody
    public String insertSchedule(@RequestBody Schedule schedule) {
        return scheduleService.insertSchedule(schedule);
    }
    
    @RequestMapping(value = "/selectSchedule", method = RequestMethod.POST)
    @ResponseBody
    public List<Schedule> selectSchedule(Schedule schedule)
    {
        return scheduleService.selectSchedules(schedule);
    }
    
    @RequestMapping(value = "/updateSchedule", method = RequestMethod.POST)
    @ResponseBody
    public String updateSchedule(@RequestBody Schedule schedule)
    {
        return scheduleService.updateSchedule(schedule);
    }
    
    @RequestMapping(value = "/deleteSchedule", method = RequestMethod.POST)
    @ResponseBody
    public String deleteSchedule(@RequestBody Schedule schedule)
    {
        return scheduleService.deleteSchedule(schedule);
    }
}
  
